package com.mgkj.dto.yf;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author : ssy
 * @date: 2024-05-27
 * @Description:
 */
@Data
@ApiModel("退货单单身")
public class InitThdBodyDto implements Serializable {

    @ApiModelProperty(value = "单别",required = true)
    @NotBlank(message = "单别不能为空")
    @JsonProperty("TJ001")
    private String TJ001;

    @ApiModelProperty(value = "单号",required = true)
    @NotBlank(message = "单号不能为空")
    @JsonProperty("TJ002")
    private String TJ002;

    @ApiModelProperty(value = "序号",required = true)
    @NotBlank(message = "序号不能为空")
    @JsonProperty("TJ003")
    private String TJ003;

    @ApiModelProperty(value = "品号",required = true)
    @NotBlank(message = "品号不能为空")
    @JsonProperty("TJ004")
    private String TJ004;

    @ApiModelProperty(value = "退货仓库编号",required = true)
    @NotBlank(message = "退货仓库编号不能为空")
    @JsonProperty("TJ011")
    private String TJ011;

    @ApiModelProperty(value = "单位",required = true)
    @NotBlank(message = "单位不能为空")
    @JsonProperty("TJ007")
    private String TJ007;

    @ApiModelProperty(value = "数量",required = true)
    @DecimalMin(value = "0.01",message = "数量不许小于0")
    @JsonProperty("TJ009")
    private Double TJ009;

    @ApiModelProperty(value = "原采购单别",required = true)
    @NotBlank(message = "原采购单别不能为空")
    @JsonProperty("TJ016")
    private String TJ016;

    @ApiModelProperty(value = "原采购单号",required = true)
    @NotBlank(message = "原采购单号不能为空")
    @JsonProperty("TJ017")
    private String TJ017;

    @ApiModelProperty(value = "原采购序号",required = true)
    @NotBlank(message = "原采购序号不能为空")
    @JsonProperty("TJ018")
    private String TJ018;

    @ApiModelProperty(value = "计价数量",required = true)
    @DecimalMin(value = "0.01",message = "数量不许小于0")
    @JsonProperty("TJ048")
    private Double TJ048;

    @ApiModelProperty(value = "计价单位",required = true)
    @NotBlank(message = "计价单位不能为空")
    @JsonProperty("TJ047")
    private String TJ047;

    @ApiModelProperty(value = "审核码",required = true)
    @Pattern(regexp = "^[NY]$",message = "只允许输入N|Y")
    @JsonProperty("TJ020")
    private String TJ020;


}
